export let dataJson = {
  rows: [
    {
      cells: [
        {
          text: '姓名',
          merge: [1, 1],
          style: {
            'font-weight': 'bold',
            'font-style': 'italic',
            color: 'red',
            'text-decoration': 'line-through',
            'text-decoration': 'underline'
          }
        },
        {
          text: '年龄',
          merge: [1, 1],
          style: { 'font-weight': 'bold', 'font-style': 'italic', color: 'red', 'text-decoration': 'line-through', 'text-decoration': 'underline' }
        },
        {
          text: '性别',
          merge: [1, 1],
          style: { 'font-weight': 'bold', 'font-style': 'italic', color: 'red', 'text-decoration': 'line-through', 'text-decoration': 'underline' }
        },
        {
          text: '电话',
          merge: [1, 1],
          style: { 'font-weight': 'bold', 'font-style': 'italic', color: 'red', 'text-decoration': 'line-through', 'text-decoration': 'underline' }
        },
        {
          text: '地址1',
          merge: [1, 1],
          style: { 'font-weight': 'bold', 'font-style': 'italic', color: 'red', 'text-decoration': 'line-through', 'text-decoration': 'underline' }
        },
        {
          text: '地址2',
          merge: [1, 1],
          style: { 'font-weight': 'bold', 'font-style': 'italic', color: 'red', 'text-decoration': 'line-through', 'text-decoration': 'underline' }
        },
        {
          text: '地址3',
          merge: [1, 1],
          style: { 'font-weight': 'bold', 'font-style': 'italic', color: 'red', 'text-decoration': 'line-through', 'text-decoration': 'underline' }
        }
      ]
    },
    {
      cells: [
        { text: '张三', merge: [1, 1], style: {} },
        { text: '18', merge: [1, 1], style: {} },
        { text: '男', merge: [1, 1], style: {} },
        { text: '1882901', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    },
    {
      cells: [
        { text: '王五', merge: [1, 1], style: {} },
        { text: '19', merge: [1, 1], style: {} },
        { text: '男', merge: [1, 1], style: {} },
        { text: '1882902', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    },
    {
      cells: [
        { text: '赵四', merge: [1, 1], style: {} },
        { text: '20', merge: [1, 1], style: {} },
        { text: '男', merge: [1, 1], style: {} },
        { text: '1882903', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    },
    {
      cells: [
        { text: '钱包', merge: [1, 1], style: {} },
        { text: '21', merge: [1, 1], style: {} },
        { text: '女', merge: [1, 1], style: {} },
        { text: '1882904', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    },
    {
      cells: [
        { text: '麦子', merge: [1, 1], style: {} },
        { text: '22', merge: [1, 1], style: {} },
        { text: '男', merge: [1, 1], style: {} },
        { text: '1882905', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    },
    {
      cells: [
        { text: '甘蔗', merge: [1, 1], style: {} },
        { text: '23', merge: [1, 1], style: {} },
        { text: '男', merge: [1, 1], style: {} },
        { text: '1882906', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    },
    {
      cells: [
        { text: '夹馍', merge: [1, 1], style: {} },
        { text: '24', merge: [1, 1], style: {} },
        { text: '男', merge: [1, 1], style: {} },
        { text: '1882907', merge: [1, 1], style: {} },
        { text: 'XXX', merge: [1, 1], style: {} },
        { text: 'YYY', merge: [1, 1], style: {} },
        { text: 'ZZZ', merge: [1, 1], style: {} }
      ]
    }
  ],
  merges: [],
  name: '',
  dataRectWidth: 0,
  printConfig: {}
};

export let letters = generateXAxisLabels(1, 100);

export let typeList = [
  {
    value: 'text',
    label: '文本'
  },
  {
    value: 'number',
    label: '数值'
  },
  {
    value: 'radio',
    label: '单选'
  },
  {
    value: 'checkbox',
    label: '多选'
  },
  {
    value: 'select',
    label: '下拉'
  },
  {
    value: 'btnAddRow',
    label: '添加行'
  },
  {
    value: 'btnDeleteRow',
    label: '删除行'
  },
  {
    value: 'uploadAttachment',
    label: '上传附件'
  },
  {
    value: 'displayAttachment',
    label: '展示附件'
  }
];
export let fontSizeList = [8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 22, 24, 26, 36, 42];

function generateXAxisLabels(startCol, endCol) {
  let labels = [];
  for (let col = startCol; col <= endCol; col++) {
    let label = '';
    let colNum = col;
    while (colNum > 0) {
      let mod = (colNum - 1) % 26;
      label = String.fromCharCode(mod + 65) + label;
      colNum = ((colNum - mod) / 26) | 0;
    }
    labels.push(label);
  }
  return labels;
}
